package com.wanxi.controller;

import com.wanxi.model.*;
import com.wanxi.service.DataService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

@RestController
@RequestMapping("/data")
public class DataController {
    @Autowired
    DataService dataService;
    @GetMapping("/getDataList")
    public Map getDataList(){
        return dataService.getDataList();
    }
    @GetMapping("/getGenderList")
    public List<Gender> getGenderList() {
        return dataService.getGenderList();
    }

    @GetMapping("/getDegreeList")
    public List<Degree> getDegreeList() {
        return dataService.getDegreeList();
    }

    @GetMapping("/getStatusList")
    public List<Status> getStatusList() {
        return dataService.getStatusList();
    }

    @GetMapping("/getEnableList")
    public List<Enable> getEnableList() {
        return dataService.getEnableList();
    }

    @GetMapping("/getRoleList")
    public List<Role> getRoleList() {
        return dataService.getRoleList();
    }

    @GetMapping("/getTeamList")
    public List<Team> getTeamList() {
        return dataService.getTeamList();
    }

    @GetMapping("/getSignStatus")
    public List<SignStatus> getSignStatus(){
        return dataService.getSignStatus();
    }

    @GetMapping("/getSignStatusByCode")
    public SignStatus getSignStatusByCode(String code){
        return dataService.getSignStatusByCode(code);
    }
}
